package com.egghiro.j2se.game.sace.device.factory.bulletfactory;

import com.egghiro.framework.j2se.game.core.model.actor.IActor2D;
import com.egghiro.j2se.game.sace.model.actor.BulletCluster;
import com.egghiro.j2se.game.sace.model.actor.FlyerComponent;
import com.egghiro.j2se.game.sace.model.actor.bullet.StaticAngleBullet;

public class StaticAngleBulletFactory extends BulletFactory {
    @Override
    public FlyerComponent createFlyer(int x, int y, double angle, IActor2D target, long life) {
        // return new StaticAngleBullet(x, y, angle, target, life);
        // TODO TEST-START
        BulletCluster cluster = new BulletCluster();
        cluster.add(new StaticAngleBullet(x, y, 4, angle, target, life));
        cluster.add(new StaticAngleBullet(x, y, 7, angle, target, life));
        return cluster;
        // TODO TEST-END
    }

    @Override
    public FlyerComponent createFlyer(int x, int y, double speed, double angle, IActor2D target, long life) {
        // return new StaticAngleBullet(x, y, speed ,angle, target, life);
        BulletCluster cluster = new BulletCluster();
        cluster.add(new StaticAngleBullet(x, y, speed, angle, target, life));
        cluster.add(new StaticAngleBullet(x, y, speed, angle, target, life));
        return cluster;
    }
}
